package uk.ac.aber.Blockmation.Tests;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;

import javax.imageio.ImageIO;

import uk.ac.aber.Blockmation.ImagesIntoScotty;

public class ImagesIntoScottyTest {

    /**
     * @param args
     * @throws IOException 
     * @throws FileNotFoundException 
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {

        ArrayList<BufferedImage> animation = new ArrayList<BufferedImage>();

        //BufferedImage bim = new BufferedImage(40,40, BufferedImage.TYPE_INT_RGB);


        BufferedImage bim;

        // prints out the format files it works with
        for (String str: ImageIO.getReaderFormatNames())
        {
        System.out.println( str );
        }

        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/1.bmp"));
        animation.add(bim);

        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/2.bmp"));
        animation.add(bim);

        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/3.bmp"));
        animation.add(bim);

        bim = ImageIO.read(new File("src/uk/ac/aber/Blockmation/Tests/4.bmp"));
        animation.add(bim);


        File file = new File("src/uk/ac/aber/Blockmation/Tests/testTxt.txt");

        ImagesIntoScotty iis = new ImagesIntoScotty();
        iis.encode(animation, file);

    }

}
